//
//  TabBarController.h
//  OrderSeat
//
//  Created by wangwei on 13-10-4.
//  Copyright (c) 2013年 wangwei. All rights reserved.
//

#import <UIKit/UIKit.h>

@class HomeViewController;
@class NearbyViewController;
@class PhotoViewController;
@class MeViewController;
@class MoreViewController;
@class LoggedViewController;

@protocol TabBarControllerDelegate

@optional
- (void)selectedTab:(UIButton *)button;

@end

@interface TabBarController : UITabBarController<UINavigationBarDelegate,UINavigationControllerDelegate>

@property(nonatomic, weak) id<TabBarControllerDelegate> tab_delegate;
@property(nonatomic, strong) NSArray *backgroudNormal;
@property(nonatomic, strong) NSArray *backgroudSelected;

@property(nonatomic,  strong) NSMutableArray *buttons;
@property (strong, nonatomic) UIView *tabbarView;

@property(nonatomic, strong) HomeViewController *homeVC;
@property(nonatomic, strong) NearbyViewController *nearbyVC;
@property(nonatomic, strong) PhotoViewController *photoVC;

@property(nonatomic, strong) MeViewController *meVC;
@property(nonatomic, strong) MoreViewController *moreVC;
@property(nonatomic, strong) LoggedViewController *loggedVC;

@property(nonatomic, strong) UINavigationController *homeNav;
@property(nonatomic, strong) UINavigationController *nearbyNav;
@property(nonatomic, strong) UINavigationController *photoNav;
@property(nonatomic, strong) UINavigationController *meNav;
@property(nonatomic, strong) UINavigationController *moreNav;
@property(nonatomic, strong) UINavigationController *loggedNav;

- (void)initButtons;
- (void)_initTabbarView;
- (void)selectedTabAtIndex:(int)buttonIndex;
- (void)initViewControllers;

@end
